﻿using System.Web.Mvc;
using System.Web.Security;
using TMC_CMS.Utility;
using TMT_CMS.BL;
using TMT_CMS.BL.Model.Home;

namespace TMC_CMS.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            return View();
        }

        [HttpPost]
        public ActionResult Login(UserLoginModel userLoginModel)
        {
            if (UserManager.UserLogin(userLoginModel)==null)
            {
                
            }
            else
            {
                return RedirectToAction("Index","Vendor");
            }

            return RedirectToAction("Index");
        }

        public ActionResult Logout()
        {
            FormsAuthentication.SignOut();
            return RedirectToAction("Index");
        }
    }
}
